package ui;

import java.awt.CardLayout;
import java.awt.Color;
import java.awt.event.ActionListener;

import javax.swing.JPanel;

import logic.ACListUser;

public class UserCenterPanel extends JPanel {
	public UserDeposit userDeposit;
	public UserWithdraw userWithdraw;
	public UserDashboard userDashboard;
	public UserTransfer userTransfer;


	public UserCenterPanel() {
		setBackground(Color.decode("#3a3a3a"));
		setSize(GlobalScreen.SIZE);
		setLayout(new CardLayout());
		userDeposit = new UserDeposit();
		userWithdraw = new UserWithdraw();
		userDashboard = new UserDashboard();
		userTransfer = new UserTransfer();

		add(userDeposit, "userDeposit");
		add(userWithdraw, "userWithdraw");
		add(userDashboard, "userDashboard");
		add(userTransfer, "userTransfer");

		show("userDashboard");
	}

	public void show(String panel) {
		((CardLayout) getLayout()).show(this, panel);
	}

	public void addACList(ACListUser ac) {
		userDeposit.addACList(ac);
		userWithdraw.addACList(ac);
		userDashboard.addACList(ac);
		userTransfer.addACList(ac);
	}

}
